Repository navigation
ci: dispatch the status update as the daemonless-dispatch App - #81
Merged
Merged
Conversation
notify-status used DISPATCH_TOKEN, a personal PAT readable by every image repo, so every daemonless-io deploy run was attributed to a person. Mint a token from an App installed on daemonless-io only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every image build ends by dispatching
status-updateto daemonless-io. That dispatch usedDISPATCH_TOKEN, a personal PAT readable by all 149 image repos throughsecrets: inherit, so every docs deploy run was attributed to a person.daemonless-dispatchis a new App installed on daemonless-io only, with contents write. Its id and key are the org secretsDISPATCH_APP_ID/DISPATCH_APP_PRIVATE_KEY(already set). A leaked key can trigger a docs deploy and nothing else.Callers use this workflow at
@main, so noDBUILD_REFbump is needed.Evidence
gh api repos/daemonless/daemonless-io/actions/runs?event=repository_dispatch→actor.login=ahzeon every run.After: a dispatch sent with a token minted from the App's key: run 43106121671,
actor.login=daemonless-dispatch[bot]. (That run was later cancelled by the deploy workflow'spagesconcurrency queue when two image builds dispatched behind it, which is the normal coalescing behavior.)Merge Danger
Door: two-way. Revert restores the PAT path;
DISPATCH_TOKENstays in place until the first real build'snotify-statusjob is confirmed, then gets deleted.Blast Radius: notify-status
Runs on every image build on main. If the secrets or the installation were wrong, that one job fails and the build itself is unaffected (
needsdo not depend on it).